﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Member.ascx.cs" Inherits="Admin_UserControls_Member" %>
<style type="text/css">
    .style1
    {
        width: 371px;
        text-align: right;
    }
</style>

<asp:UpdatePanel ID="upnlMember" runat="server" UpdateMode="Conditional">
<ContentTemplate>

    <div style="height: 40px; margin-top: 8px;">    
        <asp:Button ID="btnNew" runat="server" Text="New" onclick="btnNew_Click" />
    &nbsp;
        <input id="btnView" type="button" value="View/Edit existing records" runat="server" /><%--onclick="javascript:ViewBranches();"--%>
    </div>
    <table border="0" cellpadding="2px" cellspacing="0" width="100%">
        <tr>
            <td colspan="2" bgcolor="#D2D2D2"><b>Basic Details:</b></td>
        </tr>
        <tr>
            <td class="style1">Application Form No.: </td>
            <td><asp:TextBox ID="tbAppFormNo" runat="server"></asp:TextBox>&nbsp;<asp:RequiredFieldValidator
            ID="rfvApplicationFormNo" runat="server" ErrorMessage="Enter Application Form No." Display="Dynamic" ValidationGroup="ValidateForm"
            ForeColor="Red" ControlToValidate="tbAppFormNo"></asp:RequiredFieldValidator></td>        
        </tr>
        <tr>
            <td class="style1">Date of Joining: </td>
            <td><asp:TextBox ID="tbDOJ" runat="server"></asp:TextBox>&nbsp;<asp:ImageButton ID="imgCalendarDOJ"
                runat="server" ImageUrl="~/Admin/Images/Calendar_scheduleHS.png" />
                <ajax:CalendarExtender runat="server" TargetControlID="tbDOJ" Format="dd-MMM-yyyy" PopupButtonID="imgCalendarDOJ" ></ajax:CalendarExtender>
                &nbsp;<asp:RequiredFieldValidator
                ID="rfvDOJ" runat="server" ErrorMessage="Enter Date of Joining." Display="Dynamic" ValidationGroup="ValidateForm"
                ForeColor="Red" ControlToValidate="tbDOJ"></asp:RequiredFieldValidator>
            </td>        
        </tr>
        <tr>
            <td class="style1">Member Code: </td>
            <td><asp:TextBox ID="tbMemberCode" runat="server"></asp:TextBox>
            &nbsp;<asp:RequiredFieldValidator
            ID="rfvMemberCode" runat="server" ErrorMessage="Enter Member Code." Display="Dynamic" ValidationGroup="ValidateForm"
            ForeColor="Red" ControlToValidate="tbMemberCode"></asp:RequiredFieldValidator></td>       
        </tr>
        <tr>
            <td class="style1">For The Rank of: </td>
            <td><asp:DropDownList ID="ddlRank" runat="server" ></asp:DropDownList>
            </td>        
        </tr>
        <tr>
            <td colspan="2" bgcolor="#D2D2D2"><b>Introducer Details:</b></td>
        </tr>
        <tr>
            <td class="style1">Introducer Code: </td>
            <td><asp:TextBox ID="tbIntroducerCode" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td class="style1">Introducer Name: </td>
            <td><asp:Label ID="lblIntroducerName" runat="server"></asp:Label></td>
        </tr>
        <tr>
            <td colspan="2" bgcolor="#D2D2D2"><b>Personal Details:</b></td>
        </tr>
        <tr>
            <td class="style1">Applicant's First Name: </td>
            <td><asp:TextBox ID="tbAppFirstName" runat="server"></asp:TextBox>
            &nbsp;<asp:RequiredFieldValidator
            ID="rfvAppFirstName" runat="server" ErrorMessage="Enter First Name." Display="Dynamic" ValidationGroup="ValidateForm"
            ForeColor="Red" ControlToValidate="tbAppFirstName"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">Applicant's Middle Name: </td>
            <td><asp:TextBox ID="tbAppMiddleName" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td class="style1">Applicant's Last Name: </td>
            <td><asp:TextBox ID="tbAppLastName" runat="server"></asp:TextBox>
            &nbsp;<asp:RequiredFieldValidator
            ID="rfvAppLastName" runat="server" ErrorMessage="Enter Last Name." Display="Dynamic" ValidationGroup="ValidateForm"
            ForeColor="Red" ControlToValidate="tbAppLastName"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style1"><asp:RadioButton ID="rbFather" runat="server" Checked="true" GroupName="rbGurdianType" AutoPostBack="true" Text="Father's"  />&nbsp; 
                <asp:RadioButton ID="rbHusband" runat="server" Checked="false" GroupName="rbGurdianType" AutoPostBack="true" Text="Husband's"  />&nbsp; Name:
            </td>
            <td><asp:TextBox ID="tbFathersName" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td class="style1">Address: </td>
            <td><asp:TextBox ID="tbAddress" runat="server" TextMode="MultiLine"></asp:TextBox>
            &nbsp;<asp:RequiredFieldValidator
            ID="rfvAddress" runat="server" ErrorMessage="Enter Address." Display="Dynamic" ValidationGroup="ValidateForm"
            ForeColor="Red" ControlToValidate="tbAddress"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">Pin Code: </td>
            <td><asp:TextBox ID="tbPinCode" runat="server"></asp:TextBox>
            &nbsp;<asp:RequiredFieldValidator
            ID="rfvPinCode" runat="server" ErrorMessage="Enter Pin Code." Display="Dynamic" ValidationGroup="ValidateForm"
            ForeColor="Red" ControlToValidate="tbPinCode"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">Date of Birth (DD-MM-YYYY): </td>
            <td>
                <asp:UpdatePanel ID="updpnlDOB" runat="server">
                <ContentTemplate>                
                
                <asp:DropDownList ID="ddlDOBDate" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="DOBDropDownList_SelectedIndexChanged">                
                </asp:DropDownList>&nbsp;-
                <asp:DropDownList ID="ddlDOBMonth" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="DOBDropDownList_SelectedIndexChanged">                
                </asp:DropDownList>&nbsp;-
                <asp:DropDownList ID="ddlDOBYear" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="DOBDropDownList_SelectedIndexChanged"></asp:DropDownList>
                &nbsp;&nbsp;<asp:Label ID="lblAge" runat="server"></asp:Label>
                <asp:Label ID="lblAgeValidationMsg" runat="server" Text="Invalid date of birth" Visible="false" ForeColor="Red"></asp:Label>
                </ContentTemplate>
                <Triggers>
                <asp:AsyncPostBackTrigger ControlID="ddlDOBDate" EventName="SelectedIndexChanged" />
                <asp:AsyncPostBackTrigger ControlID="ddlDOBMonth" EventName="SelectedIndexChanged" />
                <asp:AsyncPostBackTrigger ControlID="ddlDOBYear" EventName="SelectedIndexChanged" />
                </Triggers>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td class="style1">Sex: </td>
            <td>
                <asp:DropDownList ID="ddlSex" runat="server"  >
                    <asp:ListItem>Male</asp:ListItem>
                    <asp:ListItem>Female</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="style1">Blood Group: </td>
            <td>
                <asp:DropDownList ID="ddlBloodGrp" runat="server"  >
                    <asp:ListItem>Unknown</asp:ListItem>
                    <asp:ListItem>A+ve</asp:ListItem>
                    <asp:ListItem>A-ve</asp:ListItem>
                    <asp:ListItem>B+ve</asp:ListItem>
                    <asp:ListItem>B-ve</asp:ListItem>
                    <asp:ListItem>AB+ve</asp:ListItem>
                    <asp:ListItem>AB-ve</asp:ListItem>
                    <asp:ListItem>O+ve</asp:ListItem>
                    <asp:ListItem>O-ve</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="style1">Height: </td>
            <td><asp:TextBox ID="tbHeight" runat="server"></asp:TextBox> cm
            &nbsp;<asp:RegularExpressionValidator ID="revHeight" runat="server" 
            ErrorMessage="Invalid Height Entry." ControlToValidate="tbHeight" ValidationExpression="^[0-9]*$"
            Display="Dynamic" ValidationGroup="ValidateForm" SetFocusOnError="true" 
            ForeColor="Red"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">Phone: </td>
            <td><asp:TextBox ID="tbPhone" runat="server"></asp:TextBox>
            &nbsp;<asp:RegularExpressionValidator ID="revPhone" runat="server" 
            ErrorMessage="Invalid Phone No." ControlToValidate="tbPhone" ValidationExpression="^[0-9xX\+\-]*$"
            Display="Dynamic" ValidationGroup="ValidateForm" SetFocusOnError="true" 
            ForeColor="Red"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">Mobile: </td>
            <td><asp:TextBox ID="tbMobile" runat="server"></asp:TextBox>
            &nbsp;<asp:RegularExpressionValidator ID="revMobile" runat="server" 
            ErrorMessage="Invalid Mobile No." ControlToValidate="tbMobile" ValidationExpression="^[0-9xX\+\-]*$"
            Display="Dynamic" ValidationGroup="ValidateForm" SetFocusOnError="true" 
            ForeColor="Red"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">Educational Qualification: </td>
            <td>
                <asp:TextBox ID="tbQualification" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="2" bgcolor="#D2D2D2"><b>Nominee Details:</b></td>
        </tr>
        <tr>
            <td class="style1">Name of Nominee: </td>
            <td>
                <asp:TextBox ID="tbNomineeName" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style1">Age of Nominee: </td>
            <td>
                <asp:TextBox ID="tbNomineeAge" runat="server"></asp:TextBox>
                yrs
                &nbsp;<asp:RegularExpressionValidator ID="revNomineeAge" runat="server" 
                ErrorMessage="Invalid Age Entry." ControlToValidate="tbNomineeAge" ValidationExpression="^[0-9]*$"
                Display="Dynamic" ValidationGroup="ValidateForm" SetFocusOnError="true" 
                ForeColor="Red"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="style1">Relationship with Nominee: </td>
            <td>
                <asp:TextBox ID="tbNomineeRelationship" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td><%-- colspan="2" class="right"--%>
                <asp:Button ID="btnSave" runat="server" Text="Save" 
                ValidationGroup="ValidateForm" CommandArgument="0" CommandName="InsertMember" 
                    onclick="btnSave_Click" />
                &nbsp;
                <asp:Button ID="btnCancel" runat="server" Text="Cancel" 
                CausesValidation="false" />
            </td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>
            <div id="divMsg" style="display: none;" class="divMsg" runat="server">
            </div>
            <div id="divErr" style="display: none;" class="divErr" runat="server">
            </div>
        </td>
    </tr>
    </table>
</ContentTemplate>
<Triggers>
    <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
    <%--<asp:AsyncPostBackTrigger ControlID="gvMembers" EventName="RowCommand" />--%>
    <asp:AsyncPostBackTrigger ControlID="btnNew" EventName="Click" />
    <asp:AsyncPostBackTrigger ControlID="btnCancel" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</asp:UpdatePanel>